Data Preprocessing

Import Libraries

Statistical Description of each column

Columns in dataframe

Numerical Columns to deal with

Check out the Missing Values

Getting List of Columns Having Null Values

Handling Missing Data of the dataset

Data After Dropping missing values

Data Understanding and Exploration Analysis

The feature Country has only one entry i.e USA, it is obvious since we are dealing with the USA’s dataset. so we will be deleting the feature Country.

The feature Turning_Loop has only one value — False. the feature actually means that no accidents were occured in the turning loops.

Severity

Most of the US Accidents i.e 0.8 have the severity 2 and followed by severity 4.

Proximity of the Traffic

Major percentage of the US Accidents are occured at traffic signals, Crossing, Station, Stop and Amenity. The least percentage of accidents are occured at Bump, Roundabout, Railway, No-Exit, Junction

Duration Of Top 20 Accidents

Most percentage of accidents are occured in California followed by florida.

Accident Analysis in California

As it is top most accident occured state

Bar Graph of California accidents

Pie Chart of California accidents

Weather Conditions Affecting Accidents

Accidents on Weekdays vs Weekends

Data Understanding from above Graphs

1)Most of the US Accidents i.e 0.8 have the severity 2 and followed by severity 4.

2)Major percentage of  the US Accidents  are occured at traffic signals, Crossing, Station, Stop and Amenity. The least         percentage of  accidents are occured at Bump, Roundabout, Railway, No-Exit, Junction

3)Most percentage of accidents are occured in California followed by florida.
4)Accidents are occurred in clear weather conditions(52.9%) and followed by cloudy weather 18.7% which means that weather       conditions effects very less.
5) Weekday Accidents are higher in number compared to weekends.

Data Preparation for Modeling - training and testing sets